home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Exchange
/
CD Exchange - Volume 1.iso
/
utils
/
misc
/
machv
/
programmer.lha
/
headers
/
mach.h
next >
Wrap
C/C++ Source or Header
|
1993-12-17
|
20KB
|
490 lines
#ifndef MACH_H
#define MACH_H
/* $Log: mach.h,v $
* Revision 37.002 93/10/14 08:48:00 Brian
* Release 5.0.
*
*
*/
#include <ctype.h>
#include <devices/input.h>
#include <devices/inputevent.h>
#include <dos/datetime.h>
#include <exec/types.h>
#include <exec/libraries.h>
#include <exec/memory.h>
#include <exec/ports.h>
#include <exec/semaphores.h>
/* Clock Types */
#define CLOCK_ONLY 0 /* hh:mm:ss */
#define CLOCK_PLUSMEMORY 1 /* Chip xxxx Fast xxxxx hh:mm:ss */
#define CLOCK_MEMORYONLY 2 /* Chip xxxx Fast xxxxx */
#define CLOCK_PLUSDATE 3 /* 03-16-93 hh:mm:ss */
#define CLOCK_COORDS 4 /* xxx yyy */
#define CLOCK_COMMANDBAR 5 /* gadgets only! */
#define CLOCK_BORDER_RIGHT 0 /* size gadget uses border on right. Normal */
#define CLOCK_BORDER_BOTTOM 1 /* size gadget uses bottom border */
#define CLOCK_BORDERLESS 2 /* no border at all! */
#define KEYTASK "KeyTask" /* task name for "Select A Hotkey" */
#define MACHV_REXX "MACHV_REXX"
#define UNKEYED 128 /* index for unkeyed macros */
#define MAXKEYS 128 /* keycodes 0-127. 128 is unkeyed */
#define MAX_CFG_TITLE 80 /* configuration title length */
#define MAX_LIST_TITLE 15 /* list window title */
#define MAX_LIST_STRINGBUF 14 /* string gadget under list gadget */
#define MAX_MACRO_NAME MAX_LIST_STRINGBUF
#define MAX_DIR_NAME 80 /* path to MachV.prefs */
#define MAX_FILE_NAME 31 /* MachV.prefs */
#define MAX_PASTE_APPEND 7 /* pasting prepend and append text */
#define MAX_ALARM_COMMAND 80 /* length of command for CLK_ALARM to use */
#define MAX_SETMACH_PATH 40 /* path to find SetMachV */
#define MAX_CUSTOM_MESSAGE 30 /* largest message for the clock. inc. \0 */
#define MAX_VARIABLE 80 /* number of chars for ml_Variable */
#define MAX_VARNAME 40 /* number of chars for ml_VarName */
#define MAX_AREXX_RESULT 80 /* max length of results returned */
#define MAX_NO_LAYERS 10 /* number of window titles to NOT layer */
#define DEFAULTS_SIZE 41 /* sizeof default cfg */
#define GAD_NOPOS -1 /* clock gadget has no position yet */
/* The following are set in ml_GeneralEvent and then MachV is signaled.
Some must be send with PutMsg(). These are noted below. */
#define GE_BBLANK 0 /* blank the screen */
#define GE_BUNBLANK 1 /* unblank it */
#define GE_BBEEP 2 /* tell MachV to beep */
#define GE_BKILLCLOCK 3 /* kill the clock */
#define GE_BRUNCLOCK 4 /* run it */
#define GE_BADDCONFIG 5 /* add new configuration. Use PutMsg() */
#define GE_BDELCONFIG 6 /* del configuration. Use PutMsg() */
#define GE_BSAVECONFIG 7 /* save configuration. Use PutMsg() */
#define GE_BLOADCONFIG 8 /* load configuration. Use PutMsg() */
#define GE_BSET_VARIABLE 9 /* set variable ml_VarName to ml_Variable */
#define GE_BUPDATESETMACH 10 /* tell MachV to send update msg to interface */
#define GE_BLOADBEEP 11 /* load a beep sound file. pathname in */
/* ml_BeepFileName */
#define GE_BSCREENUP 12 /* tell MachV to tell interface to come */
/* to front and scroll up. */
#define GE_BABORTPRINT 13 /* abort printing */
#define GE_BDISPLAYTIME 14 /* display time (or message) in clock */
#define GE_BFREEGADGETS 15 /* free clock gadgets */
#define GE_BSET_MOUSE_PORT 16 /* set mouse port. port in mc_MousePort */
#define GE_BNEWCONFIG 17 /* tell MachV to switch configurations */
#define GE_BPRINTCLIP 18 /* print clipboard */
#define GE_BUPDATE_PATTERNS 19 /* tell MachV to update its StringPatterns */
#define GE_BTRACE 20 /* toggle tracing */
#define GE_BNEW_WINDOW 21 /* tell MachV a new window is active */
#define GE_BHOTKEY 22 /* tell MachV to do a hotkey */
#define GE_BDO_VAR 23 /* set variable ml_VarName to ml_Variable */
/* Use PutMsg(). \0 as first char gets it. */
/* -1 as 1st char deletes the variable. */
/* general event signals */
#define GE_BLANK (1 << GE_BBLANK)
#define GE_UNBLANK (1 << GE_BUNBLANK)
#define GE_BEEP (1 << GE_BBEEP)
#define GE_KILLCLOCK (1 << GE_BKILLCLOCK)
#define GE_RUNCLOCK (1 << GE_BRUNCLOCK)
#define GE_ADDCONFIG (1 << GE_BADDCONFIG)
#define GE_DELCONFIG (1 << GE_BDELCONFIG)
#define GE_SAVECONFIG (1 << GE_BSAVECONFIG)
#define GE_LOADCONFIG (1 << GE_BLOADCONFIG)
#define GE_SET_VARIABLE (1 << GE_BSET_VARIABLE)
#define GE_UPDATESETMACH (1 << GE_BUPDATESETMACH)
#define GE_LOADBEEP (1 << GE_BLOADBEEP)
#define GE_SCREENUP (1 << GE_BSCREENUP)
#define GE_ABORTPRINT (1 << GE_BABORTPRINT)
#define GE_DISPLAYTIME (1 << GE_BDISPLAYTIME)
#define GE_FREEGADGETS (1 << GE_BFREEGADGETS)
#define GE_SET_MOUSE_PORT (1 << GE_BSET_MOUSE_PORT)
#define GE_NEWCONFIG (1 << GE_BNEWCONFIG)
#define GE_PRINTCLIP (1 << GE_BPRINTCLIP)
#define GE_UPDATE_PATTERNS (1 << GE_BUPDATE_PATTERNS)
#define GE_TRACE (1 << GE_BTRACE)
#define GE_NEW_WINDOW (1 << GE_BNEW_WINDOW)
#define GE_HOTKEY (1 << GE_BHOTKEY)
#define GE_DO_VAR (1 << GE_BDO_VAR)
/* These are set in ml_MouseEvents and then MachV is signaled. The handler */
/* usually is the only one that needs to set these. */
#define ME_BSUN 0 /* activate window under mouse */
#define ME_BKEYSUN 1 /* activate window under mouse caused by keystroke */
#define ME_BCLICKTF 2 /* move window under mouse to front */
#define ME_BCYCLE 3 /* move window or screen under mouse to back */
#define ME_BMOUSEOFF 4 /* turn mouse pointer off */
#define ME_SUN (1 << ME_BSUN)
#define ME_KEYSUN (1 << ME_BKEYSUN)
#define ME_CLICKTF (1 << ME_BCLICKTF)
#define ME_CYCLE (1 << ME_BCYCLE)
#define ME_MOUSEOFF (1 << ME_BMOUSEOFF)
/* SetMachV's screen flags. Set in ml_ScreenFlags */
#define SF_WB 1 /* Open on Workbench */
#define SF_CUSTOM 2 /* Open on custom screen */
#define SF_LACE 4 /* Use interlaced custom screen */
#define SF_SCROLL 8 /* Scroll up from bottom */
#define SF_TITLEBAR 0x10 /* Show titlebar */
/* ml_Trace flags. Set in ml_Trace */
#define TRACE_SERIAL 1
#define TRACE_CONSOLE 2
/* used to wakeup tasks or interface */
#define SIG_WAKEUP SIGBREAKF_CTRL_F
/* mc_Flag flags */
#define MC_BSUNMOUSE 0 /* can sun? */
#define MC_BKEYACTIVATE 1 /* do key activate? */
#define MC_BMOUSETOMENU 2 /* allow mouse to menu? */
#define MC_BMENU_WRAP 3 /* let mouse wrap around menus? */
#define MC_BWINDOWCYCLE 4 /* window cycling? */
#define MC_BAUTO_POPTOP 5 /* auto pop to front? */
#define MC_BKEYCLICK 6 /* key clicking? */
#define MC_BCLOCK 7 /* clock on? */
#define MC_BVERTICALCLOCK 8 /* vertical clock? */
#define MC_BCLOCKTOPWINDOW 9 /* clock can pop to top window? */
#define MC_BCLOCKFLOAT 10 /* clock can float when screen scrolls? */
#define MC_BCLOCK_GADGETS 11 /* clock has gadgets? */
#define MC_BCLOCK_SECONDS 12 /* clock has seconds? */
#define MC_BMETER 13 /* meter on? */
#define MC_BSPLINES 14 /* splines blanking? */
#define MC_BQUICKBLANK 15 /* quick blanking on? */
#define MC_BSPEAKMESSAGES 16 /* speak messages? */
#define MC_BDEBUG 17 /* debug mode? */
#define MC_BBUTTONSWAP 18 /* swap left and right mouse buttons? */
#define MC_BHOLDQUALS 19 /* hold qualifiers? */
#define MC_BHOTKEYENABLED 20 /* hotkeys enabled? */
#define MC_BSEND_UPKEYS 21 /* send up key after each down key? */
#define MC_BNOCAPSLOCK 22 /* disabled caps lock key? */
#define MC_BCLIP_REMOVELF 23 /* remove lf? */
#define MC_BCLIP_CRLF 24 /* lf to crlf? */
#define MC_BFREEZEVERT 25 /* no vertical movements? */
#define MC_BFREEZEHORZ 26 /* no horz movements */
#define MC_BKEYSOFF 27 /* no keys? */
//#define MC_BBORDERLESS 28 /* no border? */
//#define MC_BBORDERBOTTOM 29 /* border bottom */
#define MC_SUNMOUSE (1 << MC_BSUNMOUSE)
#define MC_KEYACTIVATE (1 << MC_BKEYACTIVATE)
#define MC_MOUSETOMENU (1 << MC_BMOUSETOMENU)
#define MC_MENU_WRAP (1 << MC_BMENU_WRAP)
#define MC_WINDOWCYCLE (1 << MC_BWINDOWCYCLE)
#define MC_AUTO_POPTOP (1 << MC_BAUTO_POPTOP)
#define MC_KEYCLICK (1 << MC_BKEYCLICK)
#define MC_CLOCK (1